/*
 * @Author: dailuyu
 * @Date: 2021-08-24 19:53:19
 * @Email: dly@hyrctec.com
 * @LastEditors: dailuyu
 * @LastEditTime: 2021-08-27 11:22:23
 * @Company: hyrc
 * @FilePath: \TaskErrorManage\src\api\projectManage.js
 * @Description:
 */
import axios from "axios"
export function GetProject() {
  var url = "http://localhost:3000/ProjectManageApi/get1"
  return new Promise((resolve) => {
    axios.get(url, {}).then((response) => {
      resolve(response)
    })
  })
}
export function QueryProject(data) {
  var url = "http://localhost:3000/ProjectManageApi/Query?id=" + data
  return new Promise((resolve) => {
    axios.get(url, {}).then((response) => {
      resolve(response)
    })
  })
}
export function AddProject(data) {
  var url = "http://localhost:3000/ProjectManageApi/Add"
  return new Promise((resolve) => {
    axios.post(url, data).then((response) => {
      debugger
      resolve(response)
    })
  })
}
export function DeleteProject(data) {
  var url = "http://localhost:3000/ProjectManageApi/Delete?id=" + data
  return new Promise((resolve) => {
    axios.get(url, {}).then((response) => {
      resolve(response)
    })
  })
}
export function EditProject(data) {
  var url = "http://localhost:3000/ProjectManageApi/Edit"
  return new Promise((resolve) => {
    axios.post(url, data).then((response) => {
      resolve(response)
    })
  })
}
